#include <bits/stdc++.h>
using namespace std;
using uint=unsigned int;
using ll=long long;
using ull=unsigned long long;
using i128=__int128;
const int N=1e6+5;

void solve(){
    int n;
    cin>>n;
    int ph,hh,pt,dt;
    ph=n/5*2;
    if(n>=5){
        hh=(n-5)/10+1;
    }
    else hh=0;
    pt=n/20*3;
    dt=n*2-2*(n/20);
    cout<<ph<<" "<<hh<<" "<<pt<<" "<<dt<<endl;
    return;
}

int main(){
    ios::sync_with_stdio(false);
    cin.tie(nullptr);
    cout.tie(nullptr);
    solve();
    

    return 0;
}